<?php
include_once("dataBase.php");
@$client_id=$_POST['client_id']?$_POST['client_id']:'';//获取第三方应用ID
@$redirect_uri=$_POST['redirect_uri']?$_POST['redirect_uri']:'';//获取第三方应用回调
@$state=$_POST['state']?$_POST['state']:'';//获取第三方应用回调
@$response_type=$_POST['response_type']?$_POST['response_type']:'';//表示授权类型，必选项，此处的值固定为"code"

@$email=$_POST['email']?$_POST['email']:'';//用户邮箱
@$password=$_POST['pwd']?$_POST['pwd']:'';//用户密码
@$userInfo=getUserInfoByEmail($email);
if( empty($userInfo) || $userInfo["password"]!==$password)
{
    die("错误的用户名和密码");
}
header("location:".$redirect_uri."?code=".createCode()."&state=".$state);


